package mode;

/**
 * 静态代理
 * 组合的方式实现代理
 * @author Administrator
 *代理类
 */
public class Proxy implements ISubject{
	
	private RealSubject subject;
	
	public Proxy(RealSubject subject){
		this.subject = subject;
	}

	@Override
	public void doSomething() {
		//为委托类预处理信息
		subject.doSomething();
		//事后处理数据
	}
	
	 

}
